<template>
    <div>
        <div style="position:fixed;top:0px;left:0px">
            <div class="demo">
                <wxc-minibar :title="name"
                             background-color="#009ff0"
                             text-color="#FFFFFF"
                             right-text="好友详情"
                             @wxcMinibarLeftButtonClicked="minibarLeftButtonClick"
                             @wxcMinibarRightButtonClicked="frenddeatil(event)"></wxc-minibar>
            </div>
        </div>
        <scroller class="scroll">
            <text>这是聊天消息</text>
            <text>这是聊天消息</text>
            <text>这是聊天消息</text>
            <text>这是聊天消息</text>
            <text>这是聊天消息</text>
            <text>这是聊天消息</text>
        </scroller>
        <keep-alive>
            <div class="alet-icon" v-if="isFalse">
            <div class="icon" style="margin-left:12px;width:100px;height: 100px;margin-top: 10px">
                <wxc-icon name="success" ></wxc-icon>
            </div>
            <div class="icon" style="margin-left:12px;width:100px;height: 100px;margin-top: 10px">
                <wxc-icon name="success" ></wxc-icon>
            </div>
            <div class="icon" style="margin-left:12px;width:100px;height: 100px;margin-top: 10px">
                <wxc-icon name="success" ></wxc-icon>
            </div>
            <div class="icon" style="margin-left:12px;width:100px;height: 100px;margin-top: 10px">
                <wxc-icon name="success" ></wxc-icon>
            </div>
        </div>
        </keep-alive>
        <div class="alert-modul" v-if="show">
             <div class="input-text"><input type="text" class="input-mount" placeholder="请输入巴币数量"> <text style="margin-left: 10px">巴币</text></div>
             <div class="input-text"><input type="text"  class="input-mount" placeholder="红包个数"><text  style="margin-left: 10px">个</text></div>
            <div class="input-text" style="justify-content:center;align-items: center">
                <text style="margin-left:-80px;color:crimson">发送</text>
                <text style="margin-left:80px;color: crimson" @click="concenl">取消</text></div>
        </div>
        <div class="footer">
            <div class="footer-hd">
                <div class="icon-money" @click="toggle">
                    <text class="money">红包</text>
                </div>
                <div class="icon-face" @click="togg">
                    <text class="face">表情</text>
                </div>
            </div>
            <div class="footer-bottom">
                <input type="text" placeholder="请输入消息内容" style="width: 500px;height: 100px;border-color: #00B4FF;border-width: 1px;">
                <div class="send"><text>发送</text></div>
            </div>
        </div>
    </div>
 </template>
<script>
    import { WxcMinibar } from 'weex-ui';
    import { WxcIcon } from 'weex-ui';
    import { WxcMask } from 'weex-ui';
    var navigator = weex.requireModule('navigator');
    var modal = weex.requireModule('modal');
    export default {
        components: { WxcMinibar,WxcIcon,WxcMask},
        data:{
            name:'熊san',
            show: false,
            overlayCanClose: true,
            isFalse: false,
            hasAnimation:false
        },
        created:{

        },
        methods: {
            minibarLeftButtonClick () {
            },
            minibarRightButtonClick () {
                modal.toast({ 'message': 'click rightButton!', 'duration': 1 });
            },
            toggle: function () {
                this.show = !this.show
                this.isFalse=false;
            },
            togg: function () {
                this.isFalse = !this.isFalse
                this.show=false;
            },
            concenl:function () {
                this.show = false;
            },
            qqq(){
                var bundleUrl = this.$getConfig().bundleUrl;
                bundleUrl = new String(bundleUrl);
                var nativeBase;
                var isAndroidAssets = bundleUrl.indexOf('file://assets/') >= 0;

                var isiOSAssets = bundleUrl.indexOf('file:///') >= 0 && bundleUrl.indexOf('WeexDemo.app') > 0;
                if (isAndroidAssets) {
                    nativeBase = 'file://assets/dist/';
                }
                else if (isiOSAssets) {
                    nativeBase = bundleUrl.substring(0, bundleUrl.lastIndexOf('/') + 1);
                }
                else {
                    var host = 'localhost:8081';
                    var matches = /\/\/([^\/]+?)\//.exec(bundleUrl);
                    if (matches && matches.length >= 2) {
                        host = matches[1];
                    }
                    nativeBase = 'http://' + host + '/dist/';
                }
                this.baseURL = nativeBase;
            },
            /*处理登录*/
            frenddeatil(event) {
                this.qqq();
                navigator.push({
                    url: this.baseURL+'friendDeatil.js',
                    animated: "true"
                }, event => {
                    modal.toast({ message: 'callback: ' + event })
                })
            },
        }
    };
</script>
<style scoped>
  .scroll{
      width: 750px;
      min-height:900px;
      border-color: #1c1d0d;
      margin-top:100px;
  }
    .footer{
        width: 750px;
        height:200px;
        position:fixed;
        bottom: 0px;
        border-width: 1px;
        border-color:#1c1d0d;
        display: flex;
        display: -webkit-flex;
        justify-items: center;
        align-items:center;
    }
    .footer-hd{
        width: 750px;
        height:100px;
        display: flex;
        display: -webkit-flex;
        justify-content:center;
        flex-direction: row;
        align-items:center;
        border-color: #1c1d0d;
        border-bottom-width: 1px;
    }
    .icon-money{
        width:200px;
        height: 100px;
        display: flex;
        display: -webkit-flex;
        justify-items: center;
        align-items:center;
        background-color: greenyellow;
        left:240px;
        border-radius: 5px;
        position: absolute;
    }
  .icon-face{
      width:200px;
      height: 100px;
      display: flex;
      display: -webkit-flex;
      justify-items: center;
      align-items:center;
      background-color: #ff5cce;
      left:220px;
      border-radius: 5px;
      position: absolute;
  }
    .money{
        width:100px;
        height: 100px;
        line-height: 100px;
        text-align: center;
        display: flex;
        display: -webkit-flex;
        justify-items: center;
        align-items:center;
        left:0px;
        border-radius: 5px;
    }
    .face{
        width:100px;
        height: 100px;
        line-height: 100px;
        text-align: center;
        display: flex;
        display: -webkit-flex;
        justify-items: center;
        align-items:center;
        left:0px;
        border-radius: 5px;
    }
  .icon-face{
      width:200px;
      height: 100px;
      display: flex;
      display: -webkit-flex;
      justify-items: center;
      align-items:center;
      background-color: #ff5cce;
      left:20px;
      border-radius: 5px;
      position: absolute;
  }
    .footer-bottom{
        width: 750px;
        height:100px;
        display: flex;
        display: -webkit-flex;
        flex-direction: row;
        align-items:center;
        justify-content: left;
        border-color: #5b7966;
        border-top-width: 3px;}
    .send{
        width: 250px;
        height: 100px;
        display: flex;display: -webkit-flex;
        align-items:center;
        justify-content:center;
        color: #ffffff;
        border-left-width: 3px;
        border-color: #5b7966;
        background-color: #0088fb;
    }
    .icon{
        width: 100px;
        height: 100px;
        display: flex;display: -webkit-flex;
        align-items:center;
        justify-content:center;
        color: #ffffff;
        border-left-width: 3px;
        border-color: #5b7966;
        background-color: #fbbf46;
        margin-left: 12px;
        border-radius: 100px;
    }
    .alert-modul{
        width: 500px;
        height: 350px;
        border-color: rgba(255, 91, 125, 0.31);
        border-width:1px;
        justify-content: center;
        align-items: center;
        display:flex;
        flex-direction: column;
        position: absolute;
        bottom:200px;
        left: 125px;
        background-color:rgba(38, 43, 34, 0.31);
        border-radius: 10px;
    }
    .alet-icon{
        width:580px;
        min-height: 350px;
        border-color: rgba(255, 91, 125, 0.31);
        border-width:1px;
        justify-content:left;
        display:flex;
        flex-direction:row;
        flex-wrap: wrap;
        position: absolute;
        bottom:200px;
        left: 75px;
        background-color:rgba(38, 43, 34, 0.31);
        border-radius: 10px;
    }
    .input-text{
        width: 400px;
        height: 100px;
        border-color: #1c1d0d;
        border-width: 2px;
        display: flex;display: -webkit-flex;
        flex-direction: row;
        justify-content:left;
        align-items: center;
    }
  .input-mount{
      width: 300px;
      height: 60px;
      background-color: #26dc10;
  }
</style>